package com.wangxue.stock.common.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.checkerframework.checker.units.qual.A;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author wangxue
 * @ProjectName com.wangxue.stock.common.domain
 * @Description 导出涨幅榜数据对应实体
 * @time 2022/5/26 16:48
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@HeadRowHeight(value = 35)//表头行高
@ContentRowHeight(value = 25)//内容行高
@ColumnWidth(value = 50) //列宽
public class StockExcelDomain {
    /**
     * 股票编码
     */
    @ExcelProperty(value = {"股票涨幅信息统计表","股票编码"},index = 1)
    private String code;
    /**
     * 股票名称
     */
    @ExcelProperty(value = {"股票涨幅信息统计表","股票名称"},index = 2)
    private String name;
    /*
      jdbc:decimal --->java:BigDecimal
     *前收盘价
     */
    @ExcelProperty(value = {"股票涨幅信息统计表","前收盘价"},index = 3)
    private BigDecimal preClosePrice;
    /**
     * 当前价格
     */
    @ExcelProperty(value = {"股票涨幅信息统计表","当前价格"},index = 4)
    private BigDecimal tradePrice;
    /**
     * 涨跌
     */
    @ExcelProperty(value = {"股票涨幅信息统计表","涨跌"},index = 5)
    private  BigDecimal increase;
    /**
     * 涨幅
     */
    @ExcelProperty(value = {"股票涨幅信息统计表","涨幅"},index = 6)
    private BigDecimal upDown;
    /**
     * 振幅
     */
    @ExcelProperty(value = {"股票涨幅信息统计表","振幅"},index = 7)
    private  BigDecimal amplitude;

    /*
    jdbc:bigint--->java:long
   *交易量
   */
    @ExcelProperty(value = {"股票涨幅信息统计表","交易量"},index = 8)
    private Long tradeAmt;
    /**
     * 交易金额
     */
    @ExcelProperty(value = {"股票涨幅信息统计表","交易金额"},index = 9)
    private Long tradeVol;

    /**
     * 当前日期
     */
    @ExcelProperty(value = {"股票涨幅信息统计表","日期"},index = 10)
    @DateTimeFormat("yyyy/MM/dd HH:mm")//指定日期格式
    private String curDate;

}
